Hello there welcome to these you on type of operator the time off operator is used in javascript to
find out or determine the data type that the value contains.
If you want to find out what a piece of data contains like the data type you can use the type of operator
to just terminate.
If it's a string.
If is no number if it's a bullion an object or if it's an on defined value you can use the type of operator
to ascertain that I have already routine some code here to show you how.
B types of operator works.
So this is just some sample javascript code inside the notepad plus plus editor so my code is between
the script tag.
So if I run this should or alerts what the data types should be.
Please take note that in Javascript any data type or any value or data can be classified as an object.
So some of these values may return as an object.
For example dennard value the name value might come up as an IV.
Even the a3.
This one here might come up as an object because Job us create treats them that way.
So let me run this code and you can see what it does in the browser right to begin.
You got a ranh are launching Firefox.
Ah so no is the first one here.
Dont forget in Javascript the code is executed from top to bottom.
Just like you would read a book or pulley from top to bottom so it goes from top to bottom left to right.
Right so you execute the first one is done that which is a number is saying that the type of 47 so identify
that as in number.
K..
Go on to the next one string.
Identify that this text here you are Sam is a string.
So if I click K It will jump on to the next one.
We should alert a boolean because the value here is seen.
True.
And then I got to the next montanas should be brilliant as well because K.
Okay if I click on this one is should show if I click click it will jump onto this piece of code and
revealed that it's an undefined gone to the next one.
It should show as an object and then I click okay or jump onto the next one.
We should be an object as well like legal k..
This one is an i report it treats it as an object and then this one also treats a lot of value as an
object.
Okay so this is an example of how you would use the type of operator to identify the data type.
Just a quick summary in this vigil.
I explain what the type of operator does it's use to determine or find out the data type offer value
or piece of data.
It uses the key word off I saw showed you some examples used in the type of operator.
Again I need you.
Has made sense if it hasn't.
Please feel free to contact me.
I'll be more than happy to explain.
Thank you for watching me.
I really do value and appreciate your time.
Thank you.
Bye for now.